﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Sample.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            Better.TempData.Collection.Keep("String3");

            return View();
        }
        public ActionResult Form()
        {
            return View();
        }

        [HttpPost]
        public ActionResult OnFormSubmit(string String1, string String2, string String3)
        {
            Better.TempData.Collection["String1"] = String1;
            Better.TempData.Collection["String2"] = String2;
            Better.TempData.Collection["String3"] = String3;

            return this.RedirectToAction("Index");
        }
    }
}